package com.qf.fmall.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qf.fmall.product.entity.ProductSku;
import com.qf.fmall.product.mapper.ProductSkuMapper;
import com.qf.fmall.product.service.IProductSkuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author weijy
 * @since 2024-01-16
 */
@Service
public class ProductSkuServiceImpl extends ServiceImpl<ProductSkuMapper, ProductSku> implements IProductSkuService {


    @Autowired
    private ProductSkuMapper productSkuMapper;

    @Override
    public List<ProductSku> getProductById(Integer productId) {

        return productSkuMapper.selectList(new QueryWrapper<ProductSku>()
                .eq("product_id", productId));


    }
}
